#ifndef _EON_EDITOR_PLUGIN_H
#define _EON_EDITOR_PLUGIN_H

#include "Eon.h"

typedef struct _Eon_Editor Eon_Editor;

typedef void (*Eon_Editor_Cb)(Eon_Editor *thiz, void *event_data, void *data);

extern const void * EON_EDITOR_EVENT_ELEMENT_ADD;
extern const void * EON_EDITOR_EVENT_ELEMENT_SELECT;

typedef struct _Eon_Editor_Event_Element_Add
{
	Ender_Element *e;
} Eon_Editor_Event_Element_Add;

typedef struct _Eon_Editor_Event_Element_Select
{
	Ender_Element *e;
} Eon_Editor_Event_Element_Select;

typedef enum _Eon_Editor_Plugin_Type
{
	EON_EDITOR_PLUGIN_GUI,
	EON_EDITOR_PLUGIN_TYPES,
} Eon_Editor_Plugin_Type;

typedef struct _Eon_Editor_Plugin_Gui
{
	Ender_Element * (*root_get)(void *data);
} Eon_Editor_Plugin_Gui;

typedef struct _Eon_Editor_Plugin_Descriptor
{
	const char *name;
	Eon_Editor_Plugin_Type type;
	void *type_data;
	Eina_Bool (*setup)(Eon_Editor *ee, void *data);
	void (*cleanup)(Eon_Editor *ee, void *data);
} Eon_Editor_Plugin_Descriptor;

EAPI void eon_editor_plugin_register(Eon_Editor_Plugin_Descriptor *desc, void *data);
EAPI void eon_editor_element_add(Eon_Editor *thiz, Ender_Element *e);
EAPI void eon_editor_element_select(Eon_Editor *thiz, Ender_Element *e);
EAPI void eon_editor_event_register(Eon_Editor *thiz, const void *event, Eon_Editor_Cb cb, void *data);

#endif /*_EON_EDITOR_PLUGIN_H*/

